package com.yxw.yx_hotel.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author fangmaoxin
 * @version 1.0
 * @date 2024年1月22日
 * 客户(租户)实体类
 */
@Data
@TableName("yx_hotel_tenant")
@ApiModel("客户(租户)实体类")
public class YxHotelTenantEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "tenant_id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("客户ID")
    private Long tenantId;

    @TableField(value = "tenant_name")
    @ApiModelProperty("客户名称")
    private String tenantName;

    @TableField(value = "user_name")
    @ApiModelProperty("联系人名称")
    private String userName;

    @TableField(value = "phone")
    @ApiModelProperty("联系电话")
    private String phone;

    @TableField(value = "start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("开始时间")
    private Date startTime;

    @TableField(value = "end_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("结束时间")
    private Date endTime;

    @TableField(value = "status")
    @ApiModelProperty("账号状态 0：禁用 1：启用")
    private Integer status;

    @TableField(value = "create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(value = "update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("修改时间")
    private Date updateTime;

    @TableField(value = "address")
    @ApiModelProperty("地址")
    private String address;

    @TableField(value = "whole_name")
    @ApiModelProperty("公司全称")
    private String wholeName;

    @TableField(value = "resource")
    @ApiModelProperty("附件资源")
    private String resource;
}